General Variable Info |
Variables may be used in most text strings. For example, the default
article viewer title (settable in the
configuration area) is:
\33bFrom:\33n ${ArtUserName} \33bSubj\33n: ${ArtSubj} This prints the word From: in bold, followed by the user name found in the viewed article, followed by the word Subj: again in bold, followed by the article subject header field. A variable is used in a text value. Any text of the form ${varname} is replaced by the contents of the named variable. There are several ways a variable can find its value. There is a global list of variables that applies everywhere. These variables can be seen by any object. This global list can be edited from the main editor window and may include user defined values. Also, each group, article, or filter can potentially export a set of variables. In the previous example the variables ${ArtUserName} and ${ArtSubj} are referenced. These variables are exported by the article being viewed. When a new article is selected for reading, the article viewer title will automatically change as well. |
Variable Naming & Lookup |
Variable references have the form ${Varname}. Variable names are
case sensitive and may contain any valid character except a closing
curly brace '}'. Article and group variables are searched first. If no definition is found, then the global variable list is searched in order. If more than one variable is defined with the same name, the results are undefined. |
Variable Errors |
The following conditions will trigger an error, and the variable reference
will return the string ERROR.
|
Variable Lookup Recursion |
Two types of variable recursion are permitted; this is one. If a variable expansion results in a string that contains another variable reference, variable expansion happens again on the new string until either no variable references are left, or a maximum replacement count is exceeded. For example, consider a user defined variable MyArtInfo who's definition is: ${ArtUserAbbrev} (${ArtUserName}). When the variable ${MyArtInfo} is referenced, it first yields the definition above. But the definition contains two additional variable references, one to ${ArtUserAbbrev} and another to ${ArtUserName}. These variables are in turned looked up to find their definition, and the end result might be that referencing ${MyArtInfo} yields the string: JBS (John B. Smith). |
Variable Naming Recursion |
Two types of variable recursion are permitted; this is another. Recursion is permitted on variable names. Consider three variables, var1=Foo, var2=Bar, and variable FooBarXYZ=test. The reference ${${var1}${var2}XYZ} will yield the string test. Inner variables are expanded before outer. |
Read-Only Global Variables |
Some global variables are read-only. In many cases their value will
change between expansions; for example, the amount of free memory.
Date & Time Variables (uses Locale settings)
Memory & Resource Variables
|
Article Variables |
The following variables refer to information about news articles:
|
Group Variables |
The following variables refer to information about news groups:
|
Project Variables |
The following variables refer to information about the NewsRog project:
|
Multimedia Variables |
The following variables refer to decoded multimedia data:
|
Filter Variables |
The following variables can be used in the context of the indicated
filters (any applicable group or article variables may also be used):
|